A port channel (or ether channel, link aggregation group, load-balancing group, etc.) is a single logical interface/connection that is created by combining multiple network ports in order to provide higher throughput (i.e., bandwidth) as compared to each of the network ports alone. In addition to providing higher throughput, a port channel also provides redundancy in the case of failure of individual network ports. A port channel is commonly deployed in network devices such as switches, routers, hubs, gateways, etc. in different environments including campus networks, data center networks, enterprise networks, as well as service provider networks.
One challenging problem when using a port channel is how to effectively load balance the traffic flow through the network ports in the port channel. In addition, care must be taken so that data packets associated with a given traffic flow egress from the network device along the same path in order to avoid packet out-of-sequence issues. Traffic flows are defined by unique combinations of fields included in the data packet headers including, but not limited to, the source and destination MAC addresses, the source and destination IP addresses, the source and destination ports and the protocol. In conventional load-balancing schemes, a hash value is calculated for each data packet. The inputs to the hash function can include any combination of user-configured fields such that different hash values correlate with different traffic flows. A modulo operation can be performed on the calculated hash value with the number of network ports in the port channel in order to yield the egress network port. For example, for an n-bit hash, such as a 5-bit hash, there are 32 (i.e., 2n) different hash values, which can be evenly divided among the network ports in the port channel. Data packets that hash to a particular hash value are forwarded through a particular network port. Because data packets associated with the same traffic flow hash to the same value, data packets associated with the same traffic flow egress through the same network port.
However, when using traditional load-balancing schemes, the network port selection logic is agnostic to the load on each of the network ports in the port channel. Therefore, if two or more elephant traffic flows egressing out of the port channel happen to hash to the same hash value, then both of the two or more elephant traffic flows will be forwarded over the same network port. As a result, the two or more elephant traffic flows will burden the same network port while the other network ports in the port channel are relatively underutilized.